type Color = string;
interface ColorMap extends Record<number, Color> {
  other: Color;
}
interface ColorConfigItem extends Record<'normal' | 'hightLight', ColorMap> {}
interface ColorConfig extends Record<'hole' | 'groove', ColorConfigItem> {}

export const colorConfig: ColorConfig = {
  hole: {
    normal: {
      0: '#4ce0de',
      5: 'black',
      other: 'green',
    },
    hightLight: {
      other: '#ff8080',
    },
  },
  groove: {
    normal: {
      0: 'blue',
      5: 'red',
      other: 'purple',
    },
    hightLight: {
      other: 'lightBlue',
    },
  },
};

export function findColor(colorMap: ColorMap, plankFaceId: number) {
  return colorMap[plankFaceId] ?? colorMap.other;
}
export interface HightLight {
  holes: string[];
  grooves: string[];
}
